package com.zyj.exam_app.question_manager.mapper;

import com.zyj.exam_app.question_manager.bean.QuestionBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface QuestionMapper {

    /**
     * 查询所有试题
     * @return
     */
    public List<QuestionBean> findAllQuestions();

    /**
     * 新增一个试题
     * @param question
     * @return
     */
    public int insertOneQuestion(QuestionBean question);

    /**
     * 根据ID删除试题
     * @param questionId
     * @return
     */
    public boolean deleteOneQuestionById(String questionId);

    /**
     * 根据类型查询题库
     * @return
     */
    public List<QuestionBean> selectQuestionsByType(@Param("type") String type);
}
